Optimal. Leaf size=50 \[ \frac {x}{b}-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3191, 391, 206, 208} \[ \frac {x}{b}-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 208
Rule 391
Rule 3191
Rubi steps
\begin {align*} \int \frac {\cosh ^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a-(a-b) x^2\right )} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{b d}-\frac {(a-b) \operatorname {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\tanh (c+d x)\right )}{b d}\\ &=\frac {x}{b}-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 50, normalized size = 1.00 \[ \frac {-\frac {\sqrt {a-b} \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a}}+c+d x}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.49, size = 443, normalized size = 8.86 \[ \left [\frac {2 \, d x + \sqrt {\frac {a - b}{a}} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 4 \, {\left (a b \cosh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a b \sinh \left (d x + c\right )^{2} + 2 \, a^{2} - a b\right )} \sqrt {\frac {a - b}{a}}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right )}{2 \, b d}, \frac {d x + \sqrt {-\frac {a - b}{a}} \arctan \left (-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-\frac {a - b}{a}}}{2 \, {\left (a - b\right )}}\right )}{b d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.57, size = 68, normalized size = 1.36 \[ -\frac {\frac {{\left (a - b\right )} \arctan \left (\frac {b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a - b}{2 \, \sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} b} - \frac {d x + c}{b}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.09, size = 577, normalized size = 11.54 \[ -\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d b}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d b}+\frac {a \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{d b \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}+\frac {a \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{d \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {a \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{d b \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}+\frac {a \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{d \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}-\frac {\arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{d \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right ) b}{d \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}+\frac {\arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{d \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}-\frac {\arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right ) b}{d \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.48, size = 166, normalized size = 3.32 \[ \frac {x}{b}+\frac {\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a-b\right )}{b^2}-\frac {2\,\sqrt {a-b}\,\left (b+2\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{\sqrt {a}\,b^2}\right )\,\sqrt {a-b}}{2\,\sqrt {a}\,b\,d}-\frac {\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a-b\right )}{b^2}+\frac {2\,\sqrt {a-b}\,\left (b+2\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{\sqrt {a}\,b^2}\right )\,\sqrt {a-b}}{2\,\sqrt {a}\,b\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________